package creational.singleton;

/**
 * @desc 懒汉模式 线程不安全
 */
public class Singleton2 {
    private static Singleton2 singleton = null;

    private Singleton2() {
    }

    public static Singleton2 getSingleton() {
        if (singleton == null)
            singleton = new Singleton2();
        return singleton;
    }
}
